package com.walker.elk.netty.protobuf;

public class MultiDataTest {

	public static void main(String[] args) {

		ProtoData.ProtoMessage message = ProtoData.ProtoMessage.newBuilder().setDataType(ProtoData.ProtoMessage.DataType.PERSON)
				.setPerson(
						ProtoData.Person.newBuilder().setName("Walker").setAge(33).setEmail("walker@163.com").build())
				.build();
		String dataType = message.getDataType().name();
		
		System.out.println("data type : " + dataType);
		
		String name = message.getPerson().getName();
		int age = message.getPerson().getAge();
		String email = message.getPerson().getEmail();
		
		System.out.println(name + " || " + age + " || " + email);
	}

}
